const sheet1Obj: any = {
  监测时间: 'Monitoring',
  pH: 'ph',
  'COD(mg/L)': 'cod',
  '硫酸盐(mg/L)': 'Sulfate',
  '氨氮(mg/L)': 'an',
  'BOD5（5为下标，单位：mg/L）': 'bod5',
  '总氮(mg/L)': 'tn',
  '总磷(mg/L)': 'tp',
  '氰化物（mg/L）': 'cyanide',
  '1，2-二氯乙烷': 'Dichloroethane',
  氯乙烯: 'Chloride',
  苯乙烯: 'Styrene',
  氯苯: 'Chlorobenzene',
  '间&对-二甲苯': 'mpx',
};
let columns: any = [];
Object.keys(sheet1Obj).forEach((key) => {
  columns.push({
    title: key,
    key: sheet1Obj[key],
    dataIndex: sheet1Obj[key],
  });
});
const leftColumns = [
  {
    title: '预警点位',
    key: 'warnPoint',
    dataIndex: 'warnPoint',
  },
  {
    title: '是否报警',
    key: 'whetherAlert',
    dataIndex: 'whetherAlert',
  },
  {
    title: '预警原因',
    key: 'reasonForEarlyWarning',
    dataIndex: 'reasonForEarlyWarning',
  },
];
const letBottonColumn: any = [];
const letBottonObj: any = {
  企业名称: 'computedName',
  溯源概率: 'probability',
};
Object.keys(letBottonObj).forEach((key) => {
  letBottonColumn.push({
    title: key,
    key: letBottonObj[key],
    dataIndex: letBottonObj[key],
    render: (text: any, record: any, index: any) => {
      return (
        <div
          className={`text-item ${
            record.computedName === 'D' ? 'red-row' : ''
          }`}
        >
          {text}
        </div>
      );
    },
  });
});
const rightColumns: any = [];
const rightObj: any = {
  监测井点位: 'mwl',
  '1，2-二氯乙烷': 'Dichloroethane',
  氯乙烯: 'Chloride',
  苯乙烯: 'Styrene',
  氯苯: 'Chlorobenzene',
  '间&对-二甲苯': 'mpx',
};
Object.keys(rightObj).forEach((key, index) => {
  rightColumns.push({
    title: key,
    key: index,
    dataIndex: rightObj[key],
    render: (text: any, record: any, index: any) => {
      return (
        <div className={`text-item ${record.mwl === '井5' ? 'red-row' : ''}`}>
          {text}
        </div>
      );
    },
  });
});
const rightColumns2: any = {
  氰化物: 'Cyanide',
  硫酸盐: 'Sulfate',
  TDS: 'tds',
  氯化物: 'Chl',
  'COD(Mn)(括号里面的Mn为下标）': 'cod',
  砷: 'Arsenic',
  硒: 'Selenium',
  '铬（六价）': 'Chromium ',
  铅: 'Lead',
  汞: 'Mercury',
};
// ['井1', '井2', '井3', '井4', '井5', '井6', '井7', '井8', '井9', '井10', '井11', '井12']
const positionObj: any = {
  井1: {
    longitude: 119.53595307912327,
    latitude: 26.65517022095428,
  },
  井2: {
    longitude: 119.53047943667522,
    latitude: 26.65421329480336,
  },
  井3: {
    longitude: 119.52343594884262,
    latitude: 26.65191764628087,
  },
  井4: {
    longitude: 119.53405174659567,
    latitude: 26.65296475349589,
  },
  井5: {
    longitude: 119.52906340289347,
    latitude: 26.665721012081665,
  },
  井6: {
    longitude: 119.51710897507535,
    latitude: 26.650296212953087,
  },
  井7: {
    longitude: 119.52779272883389,
    latitude: 26.664488351900562,
  },
  井8: {
    longitude: 119.52751123212039,
    latitude: 26.65833764784448,
  },
  井9: {
    longitude: 119.51749918518858,
    latitude: 26.66734363463246,
  },
  井10: {
    longitude: 119.52555358451818,
    latitude: 26.654423535197466,
  },
  井11: {
    longitude: 119.52282907219957,
    latitude: 26.66739205214179,
  },
  井12: {
    longitude: 119.52659276021721,
    latitude: 26.65653015006069,
  },
};
export {
  columns,
  leftColumns,
  rightColumns,
  letBottonColumn,
  rightColumns2,
  positionObj,
};
